package com.sbl.bajw.pc.action;

import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sbl.bajw.pc.model.ZDRYModel;
import com.sbl.bajw.pc.service.ZDRYModelService;
import com.sbl.bajw.util.JsonUtil;

@Controller
@RequestMapping("/ZDRYModel")
public class ZDRYModelAction {

	@Resource
	private ZDRYModelService service;
	
	@RequestMapping(value = "/getZDRYModel")
	public @ResponseBody String getZDRYModel(HttpServletRequest request, HttpServletResponse response) throws Exception{
		List<ZDRYModel> list = service.getZDRYModel();
		String json = JsonUtil.ConvertArrayToJson(list);
		return json;
	}
}
